/*
 * =====================================================================================
 *
 *       Filename:  SqList.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  10/28/2010 07:08:37 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Orange (OS), 
 *        Company:  
 *
 * =====================================================================================
 */
#ifndef _SQLIST_H_
#define _SQLIST_H_

#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10

typedef int BINT32;

typedef struct 
{
	elemtype *elem;
	int length;
	int listsize;
}sqlist;

BINT32 init_list(sqlist *L);
BINT32 destroy_list(sqlist *L);
BINT32 clear_list(sqlist *L);
BINT32 list_empty(sqlist *L);
BINT32 list_lenth(sqlist *L);
BINT32 get_elem(sqlist *L, int i, elemtype *e);
BINT32 LocateElem(sqlist *L, elemtype e, COMPARE compare);
BINT32 prior_elem(sqlist *L, elemtype cur_e, elemtype *pre_e);
BINT32 next_elem(sqlist *L, elemtype cur_e, elemtype *next_e);
BINT32 list_insert(sqlist *L, int i, elemtype e);
BINT32 list_delete(sqlist *L, int i, elemtype e);
BINT32 list_traverse(sqlist *L, visit());

#endif



